package com.ywu.third.exec.standard.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName YwuThirdExecConstant
 * @Description TODO
 * @Author GroundDemo
 * @Date 2024/10/11 15:17
 * @Version 1.0
 **/
public class YwuThirdExecConstant {
    public static final String CODE_HAS_EXISTS_CODE = "50001";

    public static final String CODE_HAS_EXISTS_ERROR_CODE = "code.has.exists";

    public static final String CODE_HAS_EXISTS_ERROR_MESSAGE = "编码已存在";

    public static final String FILE_NAME_IS_EMPTY_CODE = "50002";

    public static final String FILE_NAME_IS_EMPTY_ERROR_CODE = "file.name.is.empty";

    public static final String FILE_NAME_IS_EMPTY_ERROR_MESSAGE = "文件名称已存在";

    public static final String FILE_TYPE_EXCEPTION_CODE = "50003";

    public static final String FILE_TYPE_EXCEPTION_ERROR_CODE = "file.type.is.exception";

    public static final String FILE_TYPE_EXCEPTION_ERROR_MESSAGE = "文件类型异常";

    public static final String FILE_UPLOAD_ERROR_CODE = "50004";

    public static final String FILE_UPLOAD_ERROR_ERROR_CODE = "file.upload.error";

    public static final String FILE_UPLOAD_ERROR_ERROR_MESSAGE = "文件上传错误";

    public static final String RESOURCE_NOT_EXISTS_CODE = "50005";

    public static final String RESOURCE_NOT_EXISTS_ERROR_CODE = "code.has.exists";

    public static final String RESOURCE_NOT_EXISTS_ERROR_MESSAGE = "资源不存在";

    public static final String RESOURCE_NO_DRAFT_VERSION_TO_PUBLISH_CODE = "50006";

    public static final String RESOURCE_NO_DRAFT_VERSION_TO_PUBLISH_ERROR_CODE = "code.has.exists";

    public static final String RESOURCE_NO_DRAFT_VERSION_TO_PUBLISH_ERROR_MESSAGE = "编码已存在";

    public static final String RESOURCE_NO_EXEC_CONTENT_CODE = "50007";

    public static final String RESOURCE_NO_EXEC_CONTENT_ERROR_CODE = "resource.can.not.has.exec.content";

    public static final String RESOURCE_NO_EXEC_CONTENT_ERROR_MESSAGE = "该资源没有可执行的内容";

    public static final Map<String, String> EXEC_TYPE_FILE_TYPE_MAP = new HashMap<>();

    static {
        EXEC_TYPE_FILE_TYPE_MAP.put("JavaScript", "js");
        EXEC_TYPE_FILE_TYPE_MAP.put("PYTHON2", "py");
        EXEC_TYPE_FILE_TYPE_MAP.put("PYTHON3", "py");
        EXEC_TYPE_FILE_TYPE_MAP.put("class", "class");
        EXEC_TYPE_FILE_TYPE_MAP.put("jar", "jar");
    }
}
